<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/init.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jsp:include page="/WEB-INF/jsp/common/common.jsp" />
<script type="text/javascript">
	function query() {
		$("#form1").submit();
	}
	function config(dataTransferCconfig_id, flag) {
		$("input[name='dataTransferCconfig_id']").val(dataTransferCconfig_id);
		$("input[name='flag']").val(flag);
		var url = "${path}/ix/config/datatrans/config.htm";
		$("#form1").attr("action", url);
		$("#form1").submit();
	}
</script>
</head>
<body>
	<jsp:include page="/WEB-INF/jsp_lib/tip.jsp" />
	<div>
		<form action="${path}/ix/config/datatrans/list.htm" id="form1"
			method="post">
			<input name="dataTransferCconfig_id" type="hidden" />
			<input name="flag" type="hidden" />
			<h2>
				<div>数据移植开关配置</div>
			</h2>

			<table width="100%" class="listlindex">
				<tr>
					<th>名称</th>
					<th>申请人</th>
					<th>审批人</th>
					<th>当前状态</th>
					<th>操作</th>
				</tr>
				<c:forEach items="${list}" var="v">
					<tr>
						<td>数据移植开关</td>
						<td>${v.auname}</td>
						<td>${v.vuname}</td>
						<td>${v.flag}</td>
						<td><c:if test="${v.flag=='申请开启' }">
								<a title=""
									href="javascript:config('${v._id}' ,' ${v.flag}' ) ;">【申请开启】</a>
							</c:if> <c:if test="${v.flag=='开启' }">
								<a title="" href="javascript:config('${v._id}' ,'关闭' ) ;">【关闭】</a>
							</c:if> <c:if test="${v.flag=='申请中'}">

								<c:choose>
									<c:when test="${v.apply_user_id != apply}">
										<a title="" href="javascript:config('${v._id}' ,'通过' ) ;">【通过】</a>
										<a title="" href="javascript:config('${v._id}' ,'拒绝' ) ;">【拒绝】</a>
									</c:when>
									<c:otherwise>
								 	 申请中... 
								 </c:otherwise>
								</c:choose>
							</c:if></td>
					</tr>
				</c:forEach>
			</table>
			<div id="response"></div>
			<div class="options">


				<div class="clear"></div>
			</div>
		</form>

	</div>
</body>
</html>
